<template>
	<view class="flex-col page">
		<view class="flex-col group" v-if="article.length>=0">
			<view class="" v-for="(item,idx) in article" :key="idx">
				
				<view v-for="(item,i) in item.list" :key="i">
					<!-- <text class="title">{{item.strategyTitle}}</text> -->
					<u-parse :content="item.strategyText"></u-parse>
				</view>

			</view>
		</view>
		<view v-else> 
			<u-empty mode="data" width="300" heigth="200" marginTop="50%"
				icon="http://cdn.uviewui.com/uview/empty/data.png">
			</u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				article: [], //文章数据
				strategyId: '' //文章id

			};
		},
		onLoad(option) {
		
			
			this.strategyId = option.strategyId

		},
		created() {
			this.gteCollection();
		},
		methods: {


			gteCollection(strategyId) {
				this.$http('collection', {
					strategyId: this.strategyId
				}).then(r => {
					const {
						data,
						code,
						msg
					} = r
					if (code == 200) {
						this.article = data
						data.forEach(item=>{{
							item.list.forEach(item=>{
								uni.setNavigationBarTitle({
									title:item.strategyTitle
								})
							})
						}})
						console.log('稍等', data);
						
					} else {
						this.$u.toast(msg);
					}
				});
			},
		},
	};
</script>

<style scoped lang="scss">
	.title {
		display: flex;
		justify-content: center;
		align-items: center;
		font-weight: 700;
		font-size: 32rpx;
		color: #191919;
	}
	.page {
		background-color: #ffffffff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;
	}

	.group {
		padding: 32rpx 32rpx 368rpx;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.text_1 {
		color: #191919;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
		text-align: left;
	}

	.text_2 {
		margin-top: 46rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
		text-align: left;
		text-indent: 37rpx;
	}
</style>
